package foodmaterial.service;

import foodmaterial.entity.CompanySysParams;
import foodmaterial.entity.SysPermission;
import foodmaterial.entity.SysRole;
import foodmaterial.entity.SysUser;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;
import java.util.Map;

public interface PermissionService extends UserDetailsService {

    String addUser(SysUser sysUser) ;

    String modifyUser(SysUser sysUser) ;

    String modifyPassword(SysUser sysUser) ;

    List<SysUser> queryUsers(String hasSupper,Long branchId,String name) ;

    List<SysUser> queryAdminUsers() ;

    List<SysUser> queryUsersByUserType(String userType) ;

    List<Map<String,Object>> choiceUsers(String userType) ;

    SysUser queryUserByAccount(String account) ;

    List<SysRole> queryRolesByUser(Long userId) ;

    List<SysPermission> queryPermissions(Long hasRole) ;

    String addRole(SysRole sysRole) ;

    String modifyRole(SysRole sysRole) ;

    int removeRole(Long id) ;

    List<SysRole> queryRole() ;

    int grant(Long userId,List<String> roleList) ;

    String resetPassword(SysUser user) ;

    int modifySysParams(CompanySysParams companySysParams) ;
    List<CompanySysParams> querySysParams() ;
    CompanySysParams querySysParamsByCode(String code) ;

    /**
     * 获取系统日期的下周时间范围处订单
     * @return
     */
    String getNextWeekDateRange() ;

    /**
     * 获取系统星期，限制自下客户
     * @return
     */
    String getSystemWeek() ;

}
